import jsYaml from "js-yaml";
import { FileUtils } from "./FileUtils";

export class YamlUtils {
  static read<T>(path: string, schema: jsYaml.Schema): T {
    const content = FileUtils.readFile(path);
    return jsYaml.load(content, { schema }) as T;
  }
}
